#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <math.h>
#include <malloc.h>

int main()
{
    using namespace std;
    string input ;
    getline(cin, input);
    int m, n;

    vector<char> input_(input.size());
    input_.assign(input.begin(), input.end());
    string m_ = "";
    string n_ = "";
    int flag = 0;
    for (unsigned int i = 0; i < input_.size(); i++){
        if (input_[i] != ' '){
            if (flag == 0)
                m_ += input_[i];
            else
                n_ += input_[i];
        } else {
            flag = 1;
        }
    }
    m = stoi(m_);
    n = stoi(n_);

    int res = pow(m, n);
    string res_ = to_string(res);
    
    const char *res2 = res_.data();
    
    char *res2_ = (char*)malloc(4);
    res2_[0] = res2[res_.size() - 3];
    res2_[1] = res2[res_.size() - 2];
    res2_[2] = res2[res_.size() - 1];
    res2_[3] = '\0';
    cout << res2_ << endl;

    return 0;
}